package com.atguigu.gulimall.search.vo;

import com.atguigu.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class SearchResult {

    public List<SkuEsModel> products;//商品信息

    //分页信息
    private Integer  pageNum;//当前页码
    private Long total;//总记录数
    private Integer totalPages;//总页码
    private List<Integer> pageNas;//分页集合

    private List<BrandVo> brands; //品牌信息
    private List<AttrVo> attrs;//属性
    private List<CategoryVo> categorys;//分类
    private List<NavVo> navs = new ArrayList<>();
    private List<Long> attrIds = new ArrayList<>();

    @Data
    public static class NavVo {
        private String navName;
        private String navValue;
        private String link;
    }

    @Data
    public static class CategoryVo{
        private Long catelogId;//分类ID
        private String catelogName;//分类名称
    }

    @Data
    public static class BrandVo{
        private Long brandId;//品牌ID
        private String brandName;//名称
        private String brandImg;//logo
    }

    @Data
    public static class AttrVo{
        private Long attrId;//属性ID
        private String attrName;//名称
        private List<String> attrValue;//属性值
    }
}
